﻿namespace WH.Contracts.Systems.Organizations
{
    /// <summary>
    /// 
    /// </summary>
    public class OrganizationOutputByPageDto
    {
        /// <summary>
        /// 主键fid
        /// </summary>
        public string Id { get; set; } = null!;

        /// <summary>
        /// 父节点id 默认为0位顶节点
        /// </summary>
        public string? ParentId { get; set; }

        /// <summary>
        /// 机构编号
        /// </summary>
        public string? Code { get; set; }

        /// <summary>
        /// 机构名称
        /// </summary>
        public string? Name { get; set; }

        /// <summary>
        /// 状态（0停用 1正常）
        /// </summary>
        public bool IsEnable { get; set; }

        /// <summary>
        /// 是否有子机构
        /// </summary>
        public bool HasChildren { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedTime { get; set; }

        /// <summary>
        /// 层级
        /// </summary>
        public int Layer { get; set; }

        /// <summary>
        /// 层级
        /// </summary>
        public string? LayerString { get; set; }
        /// <summary>
        /// 是否叶子节点
        /// </summary>
        public bool IsLeaf { get; set; }

        /// <summary>
        /// 机构类型名称
        /// </summary>
        public string? TypeName { get; set; }

        /// <summary>
        /// 机构类型编号
        /// </summary>
        public string TypeCode { get; set; } = null!;

        public IList<OrganizationOutputByPageDto> Children { get; set; } = new List<OrganizationOutputByPageDto>();
    }
}
